package com.skyon.rule.res.spring;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.skyon.rule.res.model.PlotsInfo;

/**
 * 辅助类，用于
 * 
 * @author cfans
 *
 */


@Component("plotHandingHelper")
public class PlotHandingHelper {
	
	private static Logger logger = LoggerFactory.getLogger( PlotHandingHelper.class );
	
	@Autowired 
	private RemoteHanding remoteHanding;

	public PlotsInfo getPlotsInfo(){
		PlotsInfo plotsInfo = new PlotsInfo();
		plotsInfo.setPlotIds(remoteHanding.getPlotIds());
		plotsInfo.setAllPlotRuntimeClz(remoteHanding.getAllPlotRuntimeClz());
		plotsInfo.setAllPlotWithProcesses(remoteHanding.getAllPlotWithProcesses());
		return plotsInfo;
	}

	public boolean handingNow(){
		return remoteHanding.handingNow();
	}
	
	public void setRemoteHanding(RemoteHanding remoteHanding) {
		this.remoteHanding = remoteHanding;
	}
	
}
